package com.panshi.api.api;

import com.panshi.api.bean.ArticleReviewsBean;
import com.panshi.api.bean.PraoseLinkBean;
import com.panshi.api.util.PageSizeVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @author XiaoWangYa
 * @version 1.0
 * @date 2020/8/7 0007 下午 2:24
 */
@FeignClient("XiaoWangYa")
@Api("文章评论接口")
public interface ReviewsPort {

    @PostMapping("/addReviewsInfo")
    @ResponseBody
    @ApiModelProperty("新增文章评论")
    ArticleReviewsBean addReviewsInfo (@RequestBody ArticleReviewsBean articleReviewsBean);

    @PostMapping("/deleteReviewsInfo/{id}")
    @ResponseBody
    @ApiModelProperty("删除评论")
    String deleteReviewsInfo (@PathVariable int id);

    @PostMapping("/addArticlePraise")
    @ResponseBody
    @ApiModelProperty("点赞评论")
    int addArticlePraise (@RequestBody PraoseLinkBean praoseLinkBean);

    @PostMapping("/queryAssginArticleReviewsInfo")
    @ResponseBody
    @ApiModelProperty("查询所属评论文章")
    List<ArticleReviewsBean> queryAssginArticleReviewsInfo (@RequestBody PageSizeVO pageSizeBean);

    @PostMapping("/queryAssginArticleReplyInfo")
    @ResponseBody
    @ApiModelProperty("查询评论回复信息")
    List<ArticleReviewsBean> queryAssginArticleReplyInfo (@RequestBody PageSizeVO yb_PageSize_VO);
}
